from django.db import models
from home.baseModel import BaseModel
# Create your models here.
class Doctor(BaseModel):
    """
        医生模型
    """
    name = models.CharField(max_length=10)
    sex = models.IntegerField(verbose_name='sex')
    update_time = models.DateTimeField('更新时间')
    objects = models.Manager()

    # def __str__(self):
    #     return  self.name

# 患者模型
class Patient(BaseModel):
    """
        患者模型
    """
    name = models.CharField(max_length=10)
    sex = models.IntegerField()
    age = models.IntegerField('年龄')
    doctor = models.ForeignKey(Doctor, on_delete=models.CASCADE)
    update_time = models.DateTimeField('更新时间')

    # def __str__(self):
    #     return  self.name

